package sjms.behavior.command;

/**
 * @ClassName:
 * @Description:
 * @Author fcb
 * @Date 2020/6/6 16:19
 */
public class OnCommand implements Command {

    private Light light;

    public OnCommand(){}

    public OnCommand(Light light){
        this.light = light;
    }

    @Override
    public void execute() {
        light.lightOn();
    }

    @Override
    public void undo() {
        light.lightOff();
    }
}
